import {http} from "@/interceptor/luch-request/index.js"
// 创建排班
export const saveAttendanceGroup = (data) => {
    return http.post("api/admin/attendanceGroup/v1/saveAttendanceGroup", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// 排班列表
export const list = (data) => {
	return http.get("api/admin/attendanceGroup/v1/list", {
		data: data
	});
}

// 查询历史排班表
export const getHistory = (data) => {
	return http.get("api/admin/attendanceGroup/v1/getHistory", {
		data: data
	});
}

// 根据id查询排班
export const getById = (data) => {
	return http.get("api/admin/attendanceGroup/v1/getById", {
		data: data
	});
}

// 删除排版表
export const deleteAttendanceGroup = (id) => {
 	return http.delete("api/admin/attendanceGroup/v1/deleteAttendanceGroup/"+id, {
 		header:{
 			"content-type": "application/x-www-form-urlencoded"
 		}
 	});
}

// 编辑班次
export const updateAttendanceGroup = (data) => {
    return http.put("api/admin/attendanceGroup/v1/updateAttendanceGroup",data,{
		header:{
			"content-type": "application/json"
		}
	});	
} 

// 宝贝晨检
export const pageAttendanceRecord = (data) => {
	return http.get("api/admin/attendanceRecord/v1/pageAttendanceRecord", {
		data: data
	});
}

// 编辑晨检
export const updateAttendanceRecord = (data) => {
    return http.put("api/admin/attendanceRecord/v1/updateAttendanceRecord",data,{
		header:{
			"content-type": "application/json"
		}
	});	
} 


export const pagePickParent = (data) => {  //查询代家长接人信息
	return http.get("api/admin/pickParent/v1/pagePickParent", {
		data: data
	});
}


export const doorEvents = (data) => {  //hik获取门禁点列表
    return http.post("api/app/hik/v1/doorEvents", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}